#include "mychart.h"

mychart::mychart(QWidget *parent)
    : QWidget{parent}
{
    charview = new QChartView(this);
    charview->setGeometry(0,0,370,210);
    chart = new QChart;
    chart->setGeometry(0,0,370,500);
    charview->setChart(chart);
}

void mychart::createcharviewFun(qreal x, qreal y)
{
    series->setName("Data discount graph");
    series->append(x, y);
    //将系列添加到图表中
    chart->addSeries(series);
    chart->createDefaultAxes();//创建坐标轴
    chart->setAnimationOptions(QChart::SeriesAnimations);//设置动画效果
}

void mychart::myappend(qreal x, qreal y)
{

}

void mychart::creat()
{

}
